import axios from '../utils/axios'

// 保存聊天记录
export function saveChatHistory(params) {
  return axios.post('/chat/history', params);
}

// 获取聊天记录列表
export function getChatHistoryList(params) {
  return axios.get('/chat/history/list', { params });
}

// 获取特定会话的聊天记录
export function getChatHistory(sessionId) {
  return axios.get(`/chat/history`);
}

// 删除聊天记录
export function deleteChatHistory(sessionId) {
  return axios.delete(`/chat/history/${sessionId}`);
}

// 对话
export function chat(params) {
  return axios.get(`/chat?message`,{params} );
}